<html>
  <header>
    <title>ESTUDIO INFORMATICO PATAGONICO - SISTEMA DE DOMOTICA</title>
  </header>
  <body>
    <h1><b><i>Sistema de Domotica - Menu Principal</b></i></h1>
    <hr>
    <table border="2" summary="none" align="center" cellpadding="20">
      <tr>
        <td>
          <?php
            $estado = shell_exec('/usr/bin/sudo /usr/local/sbin/domotica -l');
            echo "<pre>$estado</pre>";
          ?>
        </td>
      <tr>
    </table>
    <br>
    <br>
    <table border="0" summary="Control de Relays" align="center">
      <tr>
        <td align="center">
          <form method="post" action="encenderRelay1.php">
            <input type="submit" value="Encender Luces Exterior">
          </form>
        </td>
        <td align="center">
          <form method="post" action="encenderRelay2.php">
            <input type="submit" value="Encender Termotanque">
          </form>
        </td>
        <td align="center">
          <form method="post" action="encenderRelay3.php">
            <input type="submit" value="Encender Calefaccion Habitacion">
          </form>
        </td>
        <td align="center">
          <form method="post" action="encenderRelay4.php">
            <input type="submit" value="Encender Calefaccion Comedor">
          </form>
        </td>
      </tr>
      <tr>
        <td align="center">
          <form method="post" action="apagarRelay1.php">
            <input type="submit" value="Apagar Luces Exterior">
          </form>
        </td>
        <td align="center">
          <form method="post" action="apagarRelay2.php">
            <input type="submit" value="Apagar Termotanque">
          </form>
        </td>
        <td align="center">
          <form method="post" action="apagarRelay3.php">
            <input type="submit" value="Apagar Calefaccion Habitacion">
          </form>
        </td>
        <td align="center">
          <form method="post" action="apagarRelay4.php">
            <input type="submit" value="Apagar Calefaccion Comedor">
          </form>
        </td>
      </tr>
      <tr>
        <td colspan="2" align="right">
          <form method="post" action="apagarTodo.php">
            <input type="submit" value="Apagar Todo">
          </form>
        </td>
        <td colspan="2" align="left">
          <form method="post" action="index.php">
            <input type="submit" value="Recargar">
          </form>
        </td>
      </tr>
    </table>



  </body>
</html>
